package cn.zhl.设计模式.适配器.objectadapter;

import cn.zhl.设计模式.适配器.classadapter.Voltage220V;
import cn.zhl.设计模式.适配器.classadapter.Voltage5V;

/**
 * @program: demos
 * @description:
 * @author: 刘振华
 * @create: 2021-03-17 13:13
 **/
public class ObjVolAdapter implements Voltage5V {
	private Voltage220V voltage220V;
	public ObjVolAdapter(Voltage220V voltage220V){
		this.voltage220V = voltage220V;
	}
	@Override
	public int output5V() {
		int i = voltage220V.output220V();
		System.out.println("对象适配器降压成功");
		return i/44;
	}
}
